<template>
  <div class="mobile mobile-result">
    <a-result
      status="success"
      title="提交成功！"
      class="mobileHeight"
    >
      <template #extra>
        <a-button key="console" type="primary" @click="closePage()">
          返回公众号
        </a-button>
        <a-button key="buy" @click="detail()">
          查看详情
        </a-button>
      </template>
    </a-result>

    <div class="weui-tabbar">
      <a href="javascript:void(0);" class="weui-tabbar__item" @click="firstPage()">
        <span><i class="iconfont iconzhuye2"></i></span>
        <p class="weui-tabbar__label">首页</p>
      </a>
      <a href="javascript:void(0);" class="weui-tabbar__item" @click="hrhsPage()">
        <span><i class="iconfont icondianzan1"></i></span>
        <p class="weui-tabbar__label">好人好事</p>
      </a>
      <a href="javascript:void(0);" class="weui-tabbar__item" @click="myPage()">
        <span><i class="iconfont iconwode-copy"></i></span>
        <p class="weui-tabbar__label">我的</p>
      </a>
    </div>
  </div>
</template>
<script>
import Template1 from "@views/jeecg/JVxeDemo/layout-demo/Template1";
import wx from 'weixin-js-sdk'
export default {
  name: 'MinorsProtecteResult',
  components: {Template1},
  data() {
    return {
      disabled: true,
    };
  },
  methods: {
    created(){//加载事件
      document.title = "提交成功";
    },
    closePage(){
      wx.closeWindow();
    },
    detail(){
      let turnFlag = this.$route.query.turnFlag;
      let id = this.$route.query.id;
      if(turnFlag == "goodThings"){
        this.$router.push({path:'/GoodThingsDetail',query:{id:id}});
      }else{
        this.$router.push({path:'/MinorsProtecteDetail',query:{id:id}});
      }
    },
    firstPage(){
      this.$router.push('/MinorsProtecteGuide');
    },
    hrhsPage(){
      this.$router.push('/GoodThingsList');
    },
    myPage(){
      this.$router.push('/PersonalMsg');
    }
  }
};
</script>
